// 贵金属特定费用系统定义
export const MetalFeeTypeDefinition = {    
    SwapFee: Object.freeze({ name: '仓息', code: "SwapFee" }),
   
   
    fromCode(code) {
        let ret = Object.values(MetalPurchaseTradeMode).find(item => item.code === code) || MetalPurchaseTradeMode.SettleMetal_SettlePrice;
        return ret;
    }
};

// 贵金属交易模式
export const MetalPurchaseTradeMode = {    
    SettleMetal_SettlePrice: Object.freeze({ name: '兑金结价', code: 0 }),
    SettleMetal: Object.freeze({ name: '兑金', code: 1 }),
    // 定价，后期补货
    SettledPrice: Object.freeze({ name: '结价', code: 2 }),
   
    fromCode(code) {
        let ret = Object.values(MetalPurchaseTradeMode).find(item => item.code === code) || MetalPurchaseTradeMode.SettleMetal_SettlePrice;
        return ret;
    }
};

// 贵金属交易模式
export const MetalSalesTradeMode = {    
    SettleMetal_SettlePrice: { name: '付金结价', code: 0 },
    SettleMetal: { name: '付金', code: 1 },
    // 定价，后期补货
    SettledPrice: { name: '结价', code: 2 },
   
    fromCode(code) {
        return Object.values(MetalSalesTradeMode).find(item => item.code === code) || MetalSalesTradeMode.SettleMetal_SettlePrice;
    }
};